package com.epidemic.project.system.leave.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.epidemic.project.system.leave.mapper.SysAskForLeaveMapper;
import com.epidemic.project.system.leave.domain.SysAskForLeave;
import com.epidemic.project.system.leave.service.ISysAskForLeaveService;
import com.epidemic.common.utils.text.Convert;

/**
 * 请假管理Service业务层处理
 * 
 * @author sys
 * @date 2023-02-01
 */
@Service
public class SysAskForLeaveServiceImpl implements ISysAskForLeaveService 
{
    @Autowired
    private SysAskForLeaveMapper sysAskForLeaveMapper;

    /**
     * 查询请假管理
     * 
     * @param id 请假管理ID
     * @return 请假管理
     */
    @Override
    public SysAskForLeave selectSysAskForLeaveById(Long id)
    {
        return sysAskForLeaveMapper.selectSysAskForLeaveById(id);
    }

    /**
     * 查询请假管理列表
     * 
     * @param sysAskForLeave 请假管理
     * @return 请假管理
     */
    @Override
    public List<SysAskForLeave> selectSysAskForLeaveList(SysAskForLeave sysAskForLeave)
    {
        return sysAskForLeaveMapper.selectSysAskForLeaveList(sysAskForLeave);
    }

    /**
     * 新增请假管理
     * 
     * @param sysAskForLeave 请假管理
     * @return 结果
     */
    @Override
    public int insertSysAskForLeave(SysAskForLeave sysAskForLeave)
    {
        return sysAskForLeaveMapper.insertSysAskForLeave(sysAskForLeave);
    }

    /**
     * 修改请假管理
     * 
     * @param sysAskForLeave 请假管理
     * @return 结果
     */
    @Override
    public int updateSysAskForLeave(SysAskForLeave sysAskForLeave)
    {
        return sysAskForLeaveMapper.updateSysAskForLeave(sysAskForLeave);
    }

    /**
     * 删除请假管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysAskForLeaveByIds(String ids)
    {
        return sysAskForLeaveMapper.deleteSysAskForLeaveByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除请假管理信息
     * 
     * @param id 请假管理ID
     * @return 结果
     */
    @Override
    public int deleteSysAskForLeaveById(Long id)
    {
        return sysAskForLeaveMapper.deleteSysAskForLeaveById(id);
    }
}
